//
//  Shape.m
//  Shape Object Extends
//
//  Created by quentin on 15/8/20.
//  Copyright (c) 2015年 QuentinLabs. All rights reserved.
//

#import "Shape.h"

NSString* colorName(ShapeColor colorName)
{
    switch (colorName) {
        case KRedColor:
            return @"Red";
            break;
        case KBlueColor:
            return @"Blue";
        case KGreenColor:
            return @"Green";
        default:
            break;
    }
    return @"no clue";
}


@implementation Shape

-(void)setFillColor:(ShapeColor)c
{
    fillColor = c;
}

-(void)setBounds:(ShapeRect)b
{
    bounds = b;
}


-(void)draw
{
    
}

@end

@implementation Circle
-(void)draw
{
    NSLog(@"drawing a circle at (%d,%d,%d,%d) in %@",
          bounds.x,bounds.y,bounds.width,bounds.height,
          colorName(fillColor));
}
@end

@implementation Rectangle
-(void) draw
{
    NSLog(@"drawing a rectangle at (%d,%d,%d,%d) in %@",
          bounds.x,bounds.y,bounds.width,bounds.height,
          colorName(fillColor));
    
}
@end